//
//  NetService.h
//  20240823
//
//  Created by 张伟 on 2024/8/26.
//

#import <Foundation/Foundation.h>
#import "CallRecordModel.h"
#import "MessageModel.h"

NS_ASSUME_NONNULL_BEGIN


@interface NetService : NSObject


/// request sign in
/// - Parameters:
///   - account: account
///   - pwd: password
///   - success: success handle
///   - error: fail handle
+(void)requestLogin:(NSString *)account password:(NSString *)pwd successHandle:(void(^)(void))success fail:(void(^)(void))error;


/// request sign up
/// - Parameters:
///   - account: account
///   - pwd: password
///   - success: success handle
///   - error: fail handle
+(void)requestRegister:(NSString *)account password:(NSString *)pwd successHandle:(void(^)(void))success fail:(void(^)(void))error;


/// add the call record
/// - Parameters:
///   - parame: userId, callTime. duration, called
///   - success: success handle
///   - error: fail handle
+(void)requestAddCallRecord:(NSDictionary *)parame successHandle:(void(^)(void))success fail:(void(^)(void))error;


/// the list of call record
/// - Parameters:
///   - parame: userid, page, pageSize
///   - success: success handle
///   - error: fail handle
+(void)requestCallRecordList:(NSDictionary *)parame successHandle:(void(^)(NSArray<CallRecordModel *> * array))success fail:(void(^)(void))error;


/// the list of message
/// - Parameters:
///   - parame: userId page size
///   - success: success handle
///   - error: fail handle
+(void)requestMessageList:(NSDictionary *)parame successHandle:(void(^)(NSArray<MessageModel *> * array))success fail:(void(^)(void))error;


/// send message
/// - Parameters:
///   - parame: userId time to content
///   - success: success handle
///   - error: fail handle
+(void)requestSendMessage:(NSDictionary *)parame successHandle:(void(^)(void))success fail:(void(^)(void))error;


/// console the account by user self
/// - Parameters:
///   - parame: id password
///   - success: success handle
///   - error: fail handle
+(void)requestDeactivateAccount:(NSDictionary *)parame successHandle:(void(^)(void))success fail:(void(^)(void))error;

@end

NS_ASSUME_NONNULL_END
